#include "../ecc.h"

#include <stdio.h>
#include <sys/time.h>

uint64_t getTimeMs()
{
    struct timeval tv;
    gettimeofday(&tv, NULL);
    return tv.tv_sec * 1000 + tv.tv_usec / 1000;
}

void vli_print(uint8_t *p_vli)
{
    unsigned i;
    for(i=0; i<NUM_ECC_DIGITS; ++i)
    {
        printf("%02X ", (unsigned)p_vli[i]);
    }
}

#if (ECC_CURVE == secp128r1)
uint8_t g_private[10][NUM_ECC_DIGITS] = {
    {0xD0, 0x17, 0x6C, 0xB6, 0x2E, 0xD1, 0x1C, 0xD2, 0xF7, 0xB2, 0x85, 0x18, 0x84, 0x05, 0xD4, 0x71},
    {0x3A, 0xB5, 0x99, 0x6C, 0x57, 0x63, 0x68, 0x86, 0xC4, 0xC5, 0x34, 0x3E, 0xA3, 0xDF, 0x14, 0x53},
    {0x08, 0x14, 0x8B, 0x45, 0xA3, 0x62, 0xD1, 0x86, 0x92, 0x3E, 0xB3, 0x7A, 0x43, 0xE6, 0xC9, 0x92},
    {0x30, 0x2C, 0x87, 0x91, 0xEF, 0xAA, 0xF7, 0x46, 0x9A, 0xC2, 0xF7, 0x45, 0xA4, 0xCC, 0x2B, 0x9E},
    {0xD1, 0xAB, 0xC2, 0x9A, 0xF0, 0xB5, 0x62, 0xAF, 0x0B, 0xBA, 0xFD, 0x2E, 0xFE, 0x21, 0x92, 0x6A},
    {0xAD, 0xD4, 0xE0, 0x1C, 0xF0, 0xDC, 0x4E, 0x61, 0xD4, 0x14, 0x13, 0x36, 0xD2, 0x87, 0x36, 0xBF},
    {0x52, 0x52, 0x0B, 0x99, 0xD9, 0x38, 0x00, 0xCE, 0x0B, 0xA0, 0xC9, 0xB4, 0x4D, 0xCF, 0x94, 0x10},
    {0x20, 0x97, 0xA2, 0xF0, 0xC9, 0xB5, 0x40, 0x01, 0xF3, 0x21, 0xCF, 0x52, 0x56, 0xE4, 0x94, 0x32},
    {0x87, 0x90, 0x1E, 0xC0, 0x2D, 0x0C, 0x17, 0x47, 0x81, 0x7A, 0x59, 0x2C, 0xB6, 0xFE, 0xD7, 0xE1},
    {0xA6, 0xC9, 0x83, 0x81, 0x50, 0x1A, 0xC0, 0xA1, 0x03, 0x96, 0x2E, 0x59, 0xD9, 0xFE, 0xB7, 0xDE},
};

EccPoint g_public[10] = {
    {{0x1F, 0x29, 0xC0, 0xE4, 0x4A, 0xE4, 0xF2, 0xA1, 0xFD, 0x53, 0x36, 0x0B, 0xC5, 0xB1, 0x30, 0x69},
        {0x9A, 0xA4, 0xD9, 0x8F, 0xB9, 0x1A, 0x81, 0xAC, 0xEC, 0xAA, 0x8F, 0x42, 0xEF, 0x5D, 0xFD, 0xDD}},
    {{0x76, 0xF0, 0x9C, 0xC3, 0xCD, 0xA5, 0x94, 0xDE, 0xD7, 0xB0, 0xAE, 0x73, 0xB4, 0x51, 0x54, 0xCE},
        {0x5F, 0xED, 0xA9, 0x3B, 0x93, 0x36, 0x74, 0xCF, 0xC7, 0x43, 0x9A, 0x3C, 0xE2, 0xD7, 0xDF, 0xED}},
    {{0x66, 0x8A, 0x36, 0x80, 0xAF, 0xCA, 0x37, 0x59, 0xE7, 0x2B, 0xEE, 0x3B, 0x3D, 0x73, 0x4E, 0xE6},
        {0xE9, 0xF7, 0xA8, 0x3A, 0xE6, 0xC9, 0x83, 0xA4, 0xD1, 0x4A, 0x79, 0x8F, 0x9E, 0xCB, 0x37, 0xC3}},
    {{0xAF, 0xAF, 0x5E, 0x1E, 0x21, 0x6D, 0xD3, 0x77, 0x7C, 0x2F, 0x53, 0xE9, 0x01, 0xE5, 0xE7, 0xAF},
        {0x39, 0xC7, 0x79, 0x7D, 0xCC, 0x3D, 0xE4, 0x7E, 0x1F, 0x98, 0x80, 0x66, 0x77, 0x40, 0x11, 0x7E}},
    {{0x25, 0x0B, 0xF0, 0x8A, 0x28, 0xA4, 0x0A, 0xE0, 0xA0, 0xAB, 0xDF, 0xA6, 0xF0, 0x2C, 0x4E, 0xF4},
        {0x1D, 0xBA, 0x43, 0xE2, 0xE8, 0x0D, 0x90, 0x7F, 0x7B, 0xC1, 0x44, 0xA9, 0x99, 0xC0, 0x11, 0x4C}},
    {{0x09, 0x61, 0x9C, 0xC3, 0x65, 0xDB, 0x73, 0xB3, 0x97, 0x46, 0xA9, 0xCD, 0x77, 0x5B, 0x34, 0x27},
        {0xE6, 0x18, 0x16, 0x40, 0x9C, 0xC4, 0xA6, 0x13, 0x0B, 0x94, 0x69, 0x58, 0x4E, 0x14, 0x15, 0x51}},
    {{0x89, 0xF1, 0xDC, 0x80, 0x28, 0xF3, 0x44, 0x0B, 0xA2, 0x21, 0xA4, 0x50, 0x15, 0xE1, 0x4F, 0x03},
        {0xF9, 0x0B, 0x0C, 0x2E, 0x7D, 0x8E, 0x0F, 0xFE, 0xB3, 0x47, 0xF9, 0x3E, 0x03, 0xB9, 0x79, 0x58}},
    {{0x68, 0xE2, 0xAD, 0x68, 0x1C, 0xF4, 0xCC, 0x7E, 0x75, 0xF5, 0x1B, 0x14, 0x4D, 0xC9, 0x76, 0x38},
        {0x34, 0xB0, 0x17, 0x80, 0x95, 0xE3, 0x98, 0x75, 0xC2, 0x9A, 0x97, 0x3F, 0x20, 0x09, 0x70, 0x70}},
    {{0x92, 0xAE, 0xCB, 0xD1, 0xEC, 0xA5, 0x1B, 0xA8, 0xD8, 0x64, 0xCF, 0xC4, 0xF2, 0xFC, 0x30, 0x8E},
        {0x42, 0x7D, 0xA7, 0x79, 0xB8, 0x78, 0xA5, 0x84, 0xFB, 0xFA, 0xE0, 0xED, 0x76, 0x39, 0x7F, 0xF6}},
    {{0x13, 0xF7, 0xBA, 0x08, 0x11, 0x04, 0x9B, 0x28, 0x3F, 0xB7, 0xC8, 0x2F, 0x64, 0x8B, 0xAB, 0x19},
        {0x22, 0x6E, 0xEE, 0x80, 0x3A, 0x55, 0x84, 0xF1, 0xF1, 0x27, 0x4E, 0xBD, 0xBF, 0xC4, 0x1D, 0x12}},
};

EccPoint g_dsa_public[10] = {
    {{0xCD, 0x0A, 0xF4, 0x3B, 0x15, 0x35, 0xC4, 0x47, 0x6C, 0x77, 0xF7, 0x7E, 0xBD, 0x56, 0x1A, 0x4A},
        {0xC4, 0x56, 0xC4, 0x86, 0xB3, 0x52, 0x54, 0x7D, 0x1C, 0xCB, 0x71, 0x5A, 0xBA, 0x7D, 0x7E, 0x55}},
    {{0xC5, 0x4B, 0x2C, 0xBB, 0x58, 0xF2, 0xA6, 0x92, 0x32, 0x41, 0x8C, 0x69, 0xF6, 0xD4, 0xEB, 0x77},
        {0xBE, 0xE2, 0xFC, 0x0D, 0xD1, 0x38, 0x9F, 0x1E, 0xBB, 0x72, 0x16, 0x1F, 0xA6, 0xD5, 0x8A, 0xE4}},
    {{0xDE, 0x65, 0x36, 0xC5, 0xF3, 0xCD, 0x96, 0xF7, 0xD2, 0x65, 0x01, 0xAE, 0x7E, 0xA4, 0xCB, 0x75},
        {0x3C, 0x15, 0x36, 0x73, 0x1A, 0x4F, 0xE5, 0xCE, 0xD7, 0x01, 0x30, 0x24, 0xA2, 0x6F, 0xC5, 0x08}},
    {{0x84, 0x76, 0x48, 0xAC, 0xFF, 0x06, 0x9A, 0x98, 0x70, 0xCF, 0x12, 0x58, 0xC5, 0x51, 0x84, 0x41},
        {0x7D, 0x26, 0x92, 0xA0, 0x7B, 0xAC, 0x28, 0xDB, 0xFA, 0x72, 0xD7, 0x79, 0x91, 0xEE, 0x98, 0x98}},
    {{0xD1, 0x3E, 0xAA, 0xB7, 0x8B, 0x8A, 0xD6, 0x6D, 0x6D, 0x92, 0x96, 0xB7, 0xA1, 0x56, 0x52, 0xA4},
        {0xB9, 0x2E, 0xD1, 0xE5, 0x06, 0xE7, 0x6C, 0xF5, 0x0D, 0x84, 0xA9, 0x9F, 0x5E, 0xF3, 0x65, 0xE6}},
    {{0xC2, 0xB8, 0x11, 0xDB, 0x01, 0xD8, 0x78, 0x9A, 0xD2, 0x90, 0x3A, 0x52, 0x29, 0xB0, 0xCA, 0xBA},
        {0x33, 0x3F, 0x5C, 0x6C, 0x0D, 0x7C, 0x32, 0x34, 0xCC, 0x20, 0x20, 0x45, 0xA2, 0xE8, 0xBA, 0x82}},
    {{0xC5, 0x7E, 0x2B, 0xB7, 0xAD, 0xDA, 0xF6, 0x2A, 0xC1, 0x40, 0x34, 0x1E, 0x56, 0xD1, 0x15, 0xDB},
        {0xAF, 0xC7, 0xA0, 0x04, 0x2B, 0x86, 0x62, 0xA2, 0x86, 0x70, 0x65, 0xE9, 0xC9, 0xA8, 0x96, 0x81}},
    {{0x56, 0xE8, 0x61, 0xA5, 0xFC, 0x12, 0x97, 0x3E, 0x8D, 0xEC, 0xB4, 0x38, 0x2A, 0x98, 0xDD, 0x2A},
        {0xCB, 0xEC, 0x45, 0x3C, 0x62, 0xF6, 0x94, 0xAD, 0x71, 0xEB, 0xA7, 0xDB, 0xA0, 0x48, 0x01, 0xE5}},
    {{0x70, 0x94, 0xA7, 0x0C, 0x8E, 0x9E, 0xC4, 0x34, 0x7B, 0xD6, 0xC5, 0xB6, 0x00, 0xB4, 0x48, 0xE5},
        {0x23, 0x94, 0x9B, 0x21, 0xAF, 0x66, 0x16, 0x2B, 0x5D, 0xE9, 0x03, 0x81, 0xA1, 0x2B, 0x98, 0xBA}},
    {{0x55, 0x38, 0xC7, 0x1F, 0x1E, 0x95, 0xE2, 0xDE, 0x31, 0xEA, 0xB2, 0xD7, 0xA5, 0x98, 0x51, 0x8D},
        {0xE4, 0x3B, 0x46, 0x65, 0xED, 0x2A, 0xC2, 0x91, 0x54, 0xC9, 0xC4, 0xEB, 0xCA, 0x17, 0x0F, 0xAC}}
};

uint8_t g_dsa_hash[10][NUM_ECC_DIGITS] = {
    {0x46, 0xA0, 0xDF, 0x7E, 0xB0, 0x56, 0xEF, 0xED, 0x05, 0x94, 0x4E, 0x20, 0x91, 0x10, 0x22, 0x6C},
    {0x13, 0x99, 0x0A, 0x2F, 0x4B, 0xE7, 0xEB, 0xC0, 0xBF, 0x76, 0xF8, 0xFB, 0x5A, 0xFC, 0x85, 0x5D},
    {0x14, 0x66, 0x4B, 0xE1, 0xFB, 0xFF, 0x6D, 0xCA, 0x2E, 0x4C, 0x6C, 0x9A, 0x76, 0xE9, 0x29, 0x2B},
    {0xA0, 0xC1, 0xB0, 0xC8, 0x6D, 0xAC, 0x4F, 0x58, 0x9C, 0xA2, 0xC7, 0xAB, 0xBB, 0x06, 0xB0, 0x76},
    {0x9E, 0x9E, 0x8F, 0xB6, 0x04, 0xD8, 0x1E, 0xC7, 0x24, 0xD0, 0xE9, 0x4E, 0x34, 0xE9, 0xF1, 0x5D},
    {0x30, 0xE1, 0x20, 0x27, 0x28, 0x1D, 0xC8, 0xCE, 0xA3, 0x48, 0xA9, 0x34, 0xAD, 0xB8, 0x25, 0xBB},
    {0xF2, 0xD3, 0x90, 0x97, 0x60, 0x98, 0xB4, 0xAE, 0x6F, 0x5C, 0x22, 0x0A, 0x47, 0x9D, 0x35, 0x2A},
    {0x1C, 0x23, 0x54, 0x37, 0xC3, 0xB3, 0xAF, 0xDE, 0x61, 0xEE, 0xD7, 0xEF, 0xCA, 0xA3, 0x94, 0x6D},
    {0x05, 0xB3, 0xCA, 0xBD, 0x93, 0x6A, 0x4F, 0xF5, 0x4B, 0x2B, 0xF9, 0x3E, 0x89, 0xCE, 0x77, 0xE6},
    {0x27, 0x66, 0xD4, 0x2C, 0x1B, 0xE2, 0xFE, 0xC8, 0xB0, 0x1A, 0xC6, 0xF1, 0x80, 0xBF, 0x1D, 0x55}
};

uint8_t g_dsa_r[10][NUM_ECC_DIGITS] = {
    {0x59, 0x07, 0x79, 0x5A, 0x0D, 0x72, 0xE0, 0xED, 0x53, 0x02, 0x4E, 0xAC, 0x89, 0x15, 0x80, 0x3E},
    {0xC5, 0x7E, 0xA4, 0x78, 0x58, 0xD1, 0x1A, 0x7B, 0xCE, 0x7B, 0x47, 0xE6, 0x07, 0xA8, 0x60, 0x3C},
    {0x62, 0xFA, 0x15, 0xEB, 0xE5, 0xB1, 0x0F, 0x7A, 0x2A, 0xF5, 0x54, 0x9D, 0x39, 0xED, 0x1D, 0xB7},
    {0x1C, 0xF1, 0x86, 0x74, 0x55, 0x8B, 0x27, 0x37, 0x06, 0xB8, 0xBD, 0x27, 0x94, 0xC3, 0xDB, 0xB1},
    {0x49, 0x5A, 0xCF, 0xE4, 0xCF, 0x70, 0xBB, 0xE8, 0xBF, 0x27, 0x43, 0x46, 0x9D, 0x85, 0x3F, 0x35},
    {0x1B, 0xBA, 0x53, 0x78, 0x63, 0x6B, 0x41, 0xDA, 0xD0, 0x28, 0xE4, 0x77, 0xD3, 0x3D, 0x63, 0x16},
    {0xC1, 0xAE, 0xBE, 0xAA, 0x60, 0xCA, 0x2E, 0x10, 0xC5, 0x0F, 0xD4, 0x72, 0xF5, 0xD6, 0xD4, 0x31},
    {0x18, 0x22, 0xB4, 0x79, 0xE9, 0xF4, 0x63, 0xA1, 0x47, 0x93, 0x1B, 0xF6, 0x8B, 0x75, 0x66, 0x39},
    {0x41, 0x4C, 0x86, 0x26, 0x83, 0x67, 0x16, 0x13, 0x93, 0x08, 0x04, 0x14, 0x7E, 0x72, 0xEF, 0xBE},
    {0x36, 0x5A, 0x1E, 0x34, 0x17, 0x73, 0xB9, 0x1F, 0x68, 0x92, 0x1F, 0x42, 0x3C, 0x8C, 0x3B, 0xC9}
};

uint8_t g_dsa_s[10][NUM_ECC_DIGITS] = {
    {0x94, 0x2D, 0x09, 0xDE, 0x22, 0x71, 0x6B, 0x41, 0xF1, 0xBB, 0xE4, 0xA4, 0x56, 0x07, 0x78, 0x76},
    {0x51, 0x03, 0xC2, 0xDF, 0x2C, 0x54, 0x24, 0x5D, 0x2C, 0xF7, 0x7E, 0x38, 0x7F, 0x2E, 0xD2, 0x3C},
    {0x22, 0x98, 0xE3, 0xFA, 0x76, 0xBB, 0xE6, 0x6D, 0x2B, 0xBF, 0x0D, 0x8D, 0xAF, 0x8C, 0x14, 0x31},
    {0x7A, 0x43, 0x7C, 0xE0, 0xC0, 0x8C, 0xAD, 0xEC, 0x85, 0x98, 0x41, 0xFB, 0x3D, 0x13, 0x91, 0xD3},
    {0xD6, 0xEF, 0x64, 0xCD, 0x27, 0x41, 0x10, 0xC7, 0x9E, 0xDC, 0xF5, 0xC5, 0x75, 0x3A, 0x43, 0x04},
    {0x66, 0xA6, 0x14, 0x35, 0xA3, 0x88, 0xDD, 0x0F, 0xD1, 0xDC, 0x44, 0x9D, 0x04, 0x2A, 0x85, 0xC0},
    {0x36, 0xF0, 0xD1, 0xB4, 0xF3, 0xD4, 0x91, 0xBF, 0x03, 0x5E, 0xE9, 0x70, 0xAE, 0xB7, 0x43, 0x03},
    {0x2B, 0x2A, 0xA6, 0x27, 0xC3, 0x2F, 0x1B, 0x86, 0x1F, 0x86, 0x11, 0x34, 0x5F, 0x4A, 0x66, 0xDA},
    {0x9E, 0xED, 0x8D, 0x16, 0x41, 0x0A, 0xC1, 0x47, 0x30, 0x9A, 0xDF, 0x88, 0x24, 0xE5, 0x0E, 0xB3},
    {0xC2, 0xD7, 0x19, 0x7A, 0xC0, 0x91, 0xAE, 0x51, 0xD9, 0xBA, 0x8D, 0x31, 0x00, 0xA1, 0x20, 0xE5}
};

#elif (ECC_CURVE == secp192r1)
uint8_t g_private[10][NUM_ECC_DIGITS] = {
    {0xBC, 0x90, 0x85, 0x8A, 0x96, 0x6B, 0xFC, 0xF8, 0xF6, 0x16, 0x6D, 0x21, 0x99, 0x19, 0x47, 0x5D, 0x15, 0x41, 0xB5, 0x77, 0x96, 0x0C, 0xC4, 0xA1},
    {0x73, 0x70, 0x86, 0x60, 0x9C, 0x50, 0x81, 0xC7, 0x1C, 0xD7, 0xAC, 0x36, 0x9E, 0xAD, 0xF5, 0x58, 0x60, 0x73, 0xDB, 0xC2, 0x8D, 0x20, 0xBD, 0x33},
    {0xEC, 0x05, 0xDE, 0x57, 0x15, 0x9D, 0x8B, 0xBE, 0x24, 0x42, 0xD8, 0xB0, 0x6A, 0x17, 0xE9, 0xD7, 0x8D, 0xEE, 0x97, 0x5C, 0x2C, 0x95, 0x23, 0x7D},
    {0xE8, 0x97, 0x47, 0x0D, 0x2F, 0x1B, 0x36, 0xAB, 0xF4, 0xBB, 0xE3, 0xFE, 0x61, 0xCF, 0x23, 0xBE, 0x7B, 0xD2, 0xF0, 0xA3, 0x58, 0x93, 0xD4, 0xD1},
    {0xE1, 0x77, 0x13, 0x68, 0xB5, 0x8E, 0xDF, 0xF4, 0xEA, 0xC8, 0x55, 0x9A, 0x18, 0x6C, 0x81, 0x04, 0x0F, 0x31, 0x8B, 0x62, 0x6E, 0xDC, 0x19, 0x50},
    {0x53, 0x1A, 0x0A, 0x43, 0x28, 0x4A, 0x95, 0x16, 0xB6, 0x5E, 0x67, 0x3A, 0x03, 0xCE, 0x71, 0xC9, 0xA5, 0x28, 0xC6, 0xF6, 0x76, 0x11, 0xE1, 0x0F},
    {0xB1, 0xC3, 0xB0, 0x7E, 0x58, 0x35, 0x18, 0x55, 0x4B, 0x27, 0xBC, 0x02, 0xAC, 0x59, 0x15, 0xFB, 0x16, 0xB4, 0x50, 0xAD, 0x02, 0xE5, 0x85, 0xA1},
    {0xFD, 0x66, 0x16, 0x66, 0xBB, 0x6A, 0x76, 0xFC, 0x37, 0x74, 0xDA, 0xCC, 0x0D, 0x3C, 0xB3, 0x63, 0x29, 0x23, 0x2B, 0x53, 0x57, 0x7B, 0xA5, 0x16},
    {0x82, 0x06, 0x54, 0x3E, 0xF1, 0xA2, 0x90, 0xE7, 0xE1, 0x91, 0x32, 0x9B, 0x35, 0xBC, 0x8E, 0xB6, 0x34, 0xE5, 0x88, 0x0C, 0x43, 0x9E, 0x60, 0x1F},
    {0x4B, 0x24, 0xC5, 0xE1, 0xE7, 0xE9, 0x37, 0x91, 0xD0, 0x7D, 0x1F, 0xD6, 0x7B, 0x0D, 0x20, 0x47, 0xA7, 0x7A, 0x70, 0x71, 0xAE, 0x4C, 0xAF, 0x3B},
};

EccPoint g_public[10] = {
    {{0xA5, 0x9F, 0x37, 0x58, 0xC0, 0xD3, 0x0A, 0xBF, 0x41, 0x63, 0xC4, 0x43, 0x4C, 0x7E, 0xC1, 0x03, 0x2D, 0x4B, 0x1E, 0x14, 0xC4, 0xFB, 0x62, 0x92},
        {0x5B, 0xBF, 0x42, 0xFD, 0x96, 0x3B, 0xA9, 0x2D, 0xD2, 0x4F, 0xF4, 0xA2, 0x22, 0xC3, 0x9A, 0xE4, 0x38, 0xD9, 0x5A, 0x32, 0x24, 0x89, 0xC7, 0x7E}},
    {{0xBD, 0x49, 0x3D, 0xD4, 0x91, 0xDC, 0x3E, 0x5E, 0x43, 0x2D, 0xB9, 0xC4, 0xAC, 0xD7, 0xAB, 0x23, 0x1F, 0xE8, 0x93, 0x23, 0x1A, 0x25, 0x44, 0xAA},
        {0xD9, 0x5A, 0xA4, 0xE2, 0x6C, 0x61, 0x4E, 0x82, 0x54, 0x1F, 0xF4, 0x8A, 0x42, 0xA0, 0x36, 0x94, 0x60, 0x45, 0xFC, 0x01, 0x68, 0x68, 0x00, 0xE8}},
    {{0x26, 0xC4, 0x8F, 0x91, 0x67, 0x16, 0x4B, 0xAF, 0xBB, 0xDF, 0xC4, 0x38, 0x46, 0x95, 0xD7, 0x84, 0x93, 0xA2, 0x16, 0x58, 0x2F, 0x57, 0x0F, 0x62},
        {0x53, 0xB8, 0x11, 0x1B, 0x14, 0xC3, 0x76, 0x2A, 0xD3, 0x93, 0xE2, 0xD7, 0xE1, 0x3F, 0x7A, 0x14, 0x35, 0xA1, 0x3B, 0x02, 0xFA, 0x30, 0xC3, 0xE8}},
    {{0x5B, 0xDB, 0x30, 0x95, 0x31, 0x47, 0xA2, 0x04, 0x64, 0x12, 0x9B, 0x81, 0x18, 0x75, 0xBB, 0xF1, 0x59, 0xAD, 0x52, 0xFC, 0x3A, 0xBA, 0x8B, 0xCE},
        {0x6D, 0x22, 0xA5, 0xCA, 0x7F, 0xE7, 0xF2, 0xB7, 0x8E, 0xAB, 0xA0, 0x44, 0x39, 0xBA, 0x1F, 0xE2, 0x2B, 0xE4, 0x20, 0x28, 0xDE, 0x4C, 0x55, 0xFE}},
    {{0xD1, 0x46, 0xEB, 0xAE, 0x9E, 0xEC, 0x35, 0x69, 0x2F, 0xCC, 0xD5, 0xE3, 0xA8, 0xCE, 0x4A, 0x4D, 0xEB, 0x2C, 0xBC, 0x86, 0xA2, 0x7C, 0xE5, 0xD1},
        {0xA3, 0x48, 0x38, 0xBE, 0x17, 0x00, 0x4B, 0x44, 0x8B, 0x14, 0x5D, 0xA5, 0x36, 0x70, 0xDE, 0x52, 0x64, 0x08, 0xEA, 0xFB, 0x44, 0x75, 0x0E, 0xBE}},
    {{0xE7, 0x0D, 0xBF, 0x18, 0x13, 0x79, 0x6E, 0xED, 0xC4, 0x2A, 0xDB, 0x85, 0xE9, 0x1B, 0x2E, 0xF6, 0x17, 0x9A, 0x95, 0x41, 0x0D, 0xE1, 0xF4, 0x1D},
        {0x21, 0x3C, 0x1B, 0x9E, 0xCF, 0xB0, 0xAE, 0x64, 0x16, 0x9D, 0x8F, 0x3A, 0x09, 0x52, 0x03, 0xCC, 0x2C, 0xB1, 0x69, 0xE3, 0xA4, 0x88, 0xD6, 0xEF}},
    {{0x34, 0xAA, 0x78, 0xF4, 0x00, 0xB9, 0xCA, 0xEA, 0xF4, 0x30, 0x0E, 0x85, 0x68, 0x79, 0xC6, 0xA4, 0x7E, 0xB7, 0x6D, 0xFC, 0x9B, 0x44, 0x31, 0x6B},
        {0x13, 0x0F, 0xA2, 0x7C, 0xAF, 0x04, 0x7C, 0xC0, 0x75, 0x06, 0x91, 0x84, 0xA4, 0xC2, 0x07, 0x09, 0xB5, 0x2D, 0xFF, 0xCE, 0x58, 0xD7, 0x85, 0xF9}},
    {{0x32, 0x56, 0xC4, 0xF5, 0xB6, 0xC2, 0x62, 0x5C, 0x27, 0xFF, 0xCD, 0xFD, 0x9A, 0x6E, 0x77, 0x08, 0x2D, 0x75, 0x55, 0x3D, 0xD6, 0xD6, 0x0E, 0x5C},
        {0x59, 0x0F, 0x65, 0x43, 0x74, 0x43, 0xAB, 0x14, 0xFA, 0x2D, 0x88, 0xD5, 0xF0, 0x7B, 0xBA, 0x9C, 0x8D, 0xCF, 0xA6, 0x67, 0xB2, 0x84, 0xD5, 0xC7}},
    {{0xDA, 0xF7, 0x54, 0x22, 0x58, 0x00, 0x33, 0x53, 0x53, 0xAC, 0xA9, 0x90, 0x1A, 0x2D, 0x06, 0x9B, 0xAE, 0x77, 0xFE, 0x27, 0x00, 0x9D, 0x4D, 0xE4},
        {0x46, 0x16, 0xE9, 0xB7, 0xFA, 0x16, 0x5C, 0x68, 0x65, 0x86, 0x07, 0xB9, 0x6F, 0x97, 0x5E, 0x3B, 0x03, 0xC1, 0xD9, 0x61, 0x83, 0xF6, 0x2D, 0x3A}},
    {{0x26, 0x51, 0x87, 0xC0, 0x67, 0xE8, 0x34, 0x97, 0xE0, 0x4D, 0x6D, 0x07, 0xAE, 0xA5, 0xBE, 0x6E, 0x72, 0x33, 0xFC, 0x3C, 0x78, 0x1E, 0xA9, 0xD6},
        {0x2D, 0x66, 0x03, 0xE1, 0x38, 0xD3, 0x9F, 0x13, 0xBA, 0x10, 0x16, 0x79, 0x94, 0x49, 0x58, 0xDE, 0xA4, 0x8D, 0x2D, 0xA1, 0x3E, 0x0A, 0x27, 0x63}},
    };

EccPoint g_dsa_public[10] = {
    {{0xAA, 0x9A, 0x4D, 0x4F, 0x14, 0xE1, 0x60, 0xAF, 0x89, 0x11, 0x99, 0x87, 0xD3, 0xE7, 0x24, 0x1D, 0x0F, 0x0D, 0x76, 0x44, 0xBE, 0x60, 0x12, 0x9E},
        {0x2B, 0xF4, 0xD2, 0x9E, 0x5B, 0x26, 0x29, 0x8B, 0x0E, 0x80, 0x6D, 0x8D, 0xD2, 0xA3, 0x05, 0xBF, 0x33, 0x4D, 0x60, 0x10, 0x77, 0x64, 0xA5, 0xC9}},
    {{0x68, 0x63, 0x05, 0x29, 0xF2, 0xC7, 0x81, 0x82, 0xE9, 0xF2, 0x2B, 0x52, 0x79, 0xBF, 0x23, 0xFC, 0x69, 0xF2, 0xF2, 0xF9, 0x65, 0x09, 0x7D, 0xE2},
        {0x35, 0xC0, 0xF1, 0x4E, 0xD2, 0xFC, 0x03, 0x31, 0xF1, 0x56, 0xA0, 0x67, 0x9D, 0x31, 0x0A, 0x19, 0x92, 0x12, 0xBE, 0x27, 0x12, 0x6D, 0x4D, 0x73}},
    {{0xC6, 0x85, 0xBE, 0x89, 0xF1, 0xFB, 0x30, 0x11, 0x22, 0xB6, 0x88, 0x12, 0xF0, 0x91, 0x68, 0x7F, 0x0E, 0x3A, 0x86, 0xBA, 0xD1, 0x69, 0x26, 0x93},
        {0x5D, 0xD9, 0xB1, 0x4A, 0xBE, 0x41, 0x0F, 0x7E, 0x13, 0x23, 0x1F, 0xCA, 0xDA, 0x3C, 0x53, 0x0A, 0xB3, 0x85, 0x75, 0xDC, 0x48, 0xB1, 0xBA, 0x12}},
    {{0x6E, 0xFF, 0x67, 0xF6, 0x5E, 0xC2, 0xC2, 0xC5, 0xC7, 0x2F, 0xC8, 0x5E, 0x06, 0x4E, 0x16, 0xF9, 0xC5, 0xDD, 0x39, 0xD1, 0x02, 0x06, 0xB8, 0xE1},
        {0x60, 0x26, 0xB0, 0xD1, 0x69, 0x1D, 0xD4, 0x7E, 0xA8, 0x6E, 0xCB, 0x32, 0x39, 0xEC, 0x24, 0x76, 0xC3, 0x88, 0x14, 0xE2, 0xBF, 0x21, 0xDF, 0xE0}},
    {{0xF7, 0x19, 0xA6, 0x46, 0xF2, 0x32, 0x84, 0x0A, 0x6B, 0x49, 0x3A, 0xF8, 0x8F, 0x30, 0x5C, 0x7A, 0x6A, 0x08, 0x77, 0x78, 0x66, 0xFF, 0x26, 0x18},
        {0x5C, 0x74, 0xE8, 0xE3, 0x62, 0x9D, 0x40, 0xA2, 0x94, 0x22, 0x38, 0x2D, 0x6D, 0x7A, 0x15, 0xCB, 0x7B, 0xED, 0x14, 0x56, 0x18, 0xF7, 0x18, 0x7B}},
    {{0x3C, 0x3D, 0x1A, 0x2F, 0x9B, 0x16, 0xD0, 0x88, 0x80, 0x72, 0x1D, 0xAA, 0x0B, 0x86, 0x12, 0xA2, 0xBC, 0x7C, 0x59, 0x1D, 0x8F, 0xC3, 0x84, 0xD5},
        {0x71, 0xC0, 0x10, 0x49, 0x76, 0x1B, 0xCA, 0x23, 0x09, 0x87, 0x5D, 0x4B, 0x49, 0xE3, 0x88, 0x73, 0xEA, 0x37, 0x50, 0x37, 0xAA, 0x68, 0x72, 0xEF}},
    {{0x33, 0x43, 0x3D, 0x4E, 0x38, 0xD2, 0x81, 0xBD, 0x5F, 0x79, 0x67, 0xE7, 0xEA, 0x77, 0x4B, 0xBD, 0x06, 0x1C, 0x60, 0xF6, 0x5E, 0x8D, 0xB2, 0xE1},
        {0x9B, 0x53, 0x80, 0xAB, 0xCB, 0x94, 0xA4, 0xFC, 0x4E, 0x1F, 0xE4, 0xB2, 0x57, 0x14, 0x7A, 0xC0, 0x03, 0x55, 0xF8, 0xD7, 0x09, 0x43, 0x17, 0x4C}},
    {{0xF9, 0x00, 0xDD, 0x77, 0x48, 0xF5, 0xAE, 0x09, 0x5B, 0xEA, 0x0D, 0xFF, 0x66, 0xF1, 0x4D, 0xD7, 0x32, 0x64, 0xE2, 0x13, 0xB7, 0x77, 0x17, 0x23},
        {0xB5, 0x4B, 0xBD, 0x08, 0x62, 0xC7, 0x95, 0x8F, 0x29, 0x5D, 0xB8, 0x04, 0x7D, 0x06, 0x3E, 0x54, 0xC3, 0x08, 0xD6, 0x1C, 0xE1, 0xDA, 0x75, 0x38}},
    {{0x6B, 0x1F, 0xFE, 0x0E, 0x76, 0xD1, 0xE0, 0x34, 0x4D, 0x1B, 0x1B, 0x37, 0x84, 0x71, 0xE3, 0x6C, 0xD9, 0xF8, 0x65, 0xAA, 0xFA, 0xA9, 0xBF, 0x20},
        {0x1A, 0x52, 0x3D, 0xA7, 0x9D, 0x51, 0xBA, 0xED, 0x58, 0x4D, 0x28, 0xE3, 0x33, 0x7B, 0x6F, 0x74, 0x0F, 0x47, 0x43, 0x21, 0x4B, 0x59, 0x1A, 0x69}},
    {{0x63, 0xB5, 0xE1, 0x07, 0x2C, 0x49, 0x36, 0x2D, 0x63, 0xA2, 0xD6, 0x70, 0x38, 0x39, 0x08, 0x25, 0xAC, 0x89, 0x5E, 0x86, 0x13, 0xB4, 0x38, 0x98},
        {0x3C, 0x2B, 0xB5, 0xCE, 0x6A, 0x96, 0x44, 0x7E, 0xCF, 0x6A, 0x62, 0x11, 0x41, 0x0C, 0x7B, 0x87, 0x61, 0xDC, 0xC8, 0x27, 0x95, 0x77, 0xB4, 0xAF}}
};

uint8_t g_dsa_hash[10][NUM_ECC_DIGITS] = {
    {0x79, 0x13, 0x6C, 0x1D, 0x9B, 0x2F, 0xD4, 0xDA, 0xF0, 0xA2, 0xD6, 0x8B, 0xBF, 0x6F, 0xD2, 0xAC, 0x7C, 0x6F, 0x0B, 0xC4, 0xCA, 0xB9, 0x62, 0x04},
    {0x2C, 0xAF, 0xED, 0x94, 0x9B, 0x7F, 0x7C, 0x34, 0x41, 0x8D, 0xBF, 0x4F, 0xB4, 0xA2, 0xF1, 0x9A, 0xAC, 0xC4, 0x83, 0x48, 0x4E, 0xB8, 0xE6, 0x15},
    {0x44, 0x8A, 0xEA, 0x8A, 0xE0, 0x3F, 0xB5, 0x91, 0xBC, 0x13, 0x17, 0x46, 0xB7, 0xF4, 0x51, 0xB1, 0x4B, 0x03, 0x11, 0x02, 0x70, 0x21, 0xD9, 0x1C},
    {0xEB, 0x90, 0x55, 0x89, 0x83, 0x46, 0x75, 0xBD, 0x87, 0xE1, 0xE1, 0xAE, 0xF4, 0x57, 0x2B, 0x9B, 0x33, 0xD4, 0xC0, 0x3A, 0x30, 0xA6, 0xAB, 0x96},
    {0xA7, 0xF2, 0x3C, 0xA0, 0xE6, 0xD7, 0xE3, 0x8A, 0x57, 0x32, 0x87, 0x36, 0x01, 0x03, 0x75, 0x78, 0x80, 0xD0, 0x0F, 0x7A, 0xC8, 0xC5, 0xFB, 0x86},
    {0xBE, 0x91, 0x9D, 0x67, 0x75, 0x61, 0x84, 0x7B, 0xD4, 0x4C, 0xE6, 0x2D, 0x8A, 0xA1, 0x01, 0x19, 0xCF, 0x52, 0x97, 0x51, 0xF7, 0xC9, 0x28, 0x6E},
    {0x9F, 0xBB, 0x03, 0xC8, 0x14, 0x98, 0x29, 0x96, 0x01, 0x6A, 0x71, 0x60, 0x92, 0x03, 0xE9, 0x06, 0x35, 0x89, 0x66, 0x9C, 0x18, 0x60, 0x52, 0x96},
    {0x2C, 0xB3, 0x75, 0x51, 0x23, 0x25, 0xDE, 0x07, 0x05, 0x45, 0xAE, 0xAF, 0x43, 0x85, 0xA9, 0xAB, 0xFA, 0xD1, 0xED, 0x83, 0x54, 0x9D, 0x7E, 0x83},
    {0x88, 0xCA, 0x60, 0x19, 0x3E, 0x9B, 0x87, 0xF4, 0x4A, 0x07, 0x3D, 0x40, 0xB3, 0x85, 0x12, 0x7A, 0xB8, 0x69, 0x0D, 0xEF, 0x1E, 0x56, 0x11, 0x71},
    {0xEA, 0x68, 0x3D, 0xA5, 0x97, 0x47, 0xF2, 0x01, 0x43, 0x86, 0x63, 0x34, 0xC2, 0x1E, 0xB9, 0x53, 0x7A, 0xEF, 0x2D, 0xD9, 0xE3, 0xC5, 0x79, 0xE7}
};

uint8_t g_dsa_r[10][NUM_ECC_DIGITS] = {
    {0x7D, 0x9D, 0xDC, 0xB2, 0xF4, 0x43, 0x38, 0x5C, 0x9D, 0xB0, 0x94, 0x32, 0xE0, 0x06, 0xAF, 0x64, 0x00, 0x1B, 0xBF, 0x53, 0x41, 0xE0, 0x20, 0x9B},
    {0x58, 0xF7, 0xF4, 0x0B, 0x10, 0x57, 0x13, 0x77, 0x44, 0xB7, 0x67, 0x72, 0xC1, 0x95, 0xBE, 0x35, 0x14, 0x35, 0x0D, 0xD5, 0x31, 0x1D, 0x95, 0xD5},
    {0x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 0x6C, 0x32, 0x4E, 0xE2, 0x0B, 0x91, 0xA1, 0x01, 0x77, 0x05, 0x8E}
};

uint8_t g_dsa_s[10][NUM_ECC_DIGITS] = {
    {0xA1, 0x23, 0x95, 0x45, 0xB6, 0x77, 0x9C, 0x11, 0xCB, 0x62, 0xA0, 0x52, 0x1A, 0x57, 0x20, 0xA2, 0x63, 0x9B, 0x3E, 0xC2, 0xFE, 0xAA, 0x1C, 0x93},
    {0x0E, 0x1E, 0x1E, 0x49, 0x12, 0x38, 0xE2, 0x17, 0x62, 0x6B, 0x12, 0x34, 0xA7, 0xF2, 0x4E, 0x4B, 0xBE, 0x94, 0x0D, 0x03, 0xB3, 0xD8, 0x86, 0xD5},
    {0x6E, 0x59, 0x88, 0xC0, 0x70, 0x42, 0xE8, 0x9F, 0x6E, 0x4B, 0x79, 0xCE, 0xDF, 0xD6, 0xF7, 0xD3, 0x8B, 0xCE, 0x35, 0xD2, 0x65, 0x24, 0x31, 0x50},
    {0x87, 0x84, 0x20, 0xB0, 0xCC, 0xCE, 0x91, 0x98, 0xF9, 0x49, 0xA2, 0x17, 0x80, 0xBA, 0xFE, 0xAD, 0x48, 0xDF, 0x66, 0xAC, 0xC5, 0x53, 0xD8, 0x3D},
    {0xA5, 0xCB, 0x7E, 0x35, 0x5B, 0x1B, 0x80, 0x92, 0xE7, 0x57, 0xDA, 0x98, 0x5A, 0xD4, 0x6C, 0xD3, 0x90, 0x9F, 0x15, 0xCC, 0xCA, 0x4D, 0x15, 0x08},
    {0x8B, 0xFA, 0x1C, 0xB1, 0x46, 0x70, 0xD4, 0x47, 0x76, 0xEB, 0x5E, 0x17, 0x8D, 0x9A, 0xB2, 0xC2, 0xCB, 0xA3, 0x97, 0xD0, 0xBF, 0x53, 0xD6, 0xEF},
    {0x59, 0xEF, 0x88, 0xF9, 0x4F, 0x0C, 0x21, 0xE2, 0xEA, 0xD2, 0x50, 0x85, 0xB5, 0x74, 0x73, 0x80, 0x89, 0xAA, 0xE5, 0x35, 0x39, 0x1A, 0x7B, 0x2D},
    {0x34, 0x2F, 0xC1, 0x10, 0x14, 0xD1, 0x25, 0x37, 0x4C, 0xB4, 0xC1, 0x0F, 0xBA, 0x70, 0x31, 0x3F, 0xAD, 0x82, 0x1E, 0x7B, 0xC3, 0x5F, 0x1B, 0x33},
    {0x5C, 0x05, 0xE9, 0x2C, 0x64, 0x98, 0x79, 0xAB, 0x62, 0x42, 0x5F, 0x0D, 0x96, 0x30, 0xFD, 0x08, 0x73, 0x21, 0xA3, 0xA8, 0x2F, 0x63, 0xCF, 0xFE},
    {0xC9, 0x8F, 0x49, 0x9C, 0xAC, 0xDC, 0xF7, 0x4F, 0x23, 0x3A, 0x9B, 0xAD, 0x04, 0x39, 0x9F, 0xAF, 0x1C, 0x68, 0xD7, 0x5A, 0xE4, 0xC2, 0xC1, 0xA1}
};


#elif (ECC_CURVE == secp256r1)

uint8_t g_private[10][NUM_ECC_DIGITS] = {
    {0xFA, 0xE0, 0x99, 0x93, 0x47, 0x79, 0x88, 0xEB, 0x2E, 0x41, 0xCC, 0xFA, 0x11, 0xD4, 0xAF, 0xC7, 0xE8, 0xE1, 0x5E, 0x73, 0xF4, 0xFA, 0x8A, 0x2B, 0x7F, 0x3E, 0x6E, 0x98, 0x53, 0x19, 0x2B, 0x74},
    {0x0E, 0x48, 0x9F, 0x07, 0x51, 0x4E, 0xBB, 0x41, 0x61, 0xA6, 0xEE, 0x76, 0x5D, 0x66, 0xB5, 0xE7, 0xD8, 0x1E, 0x83, 0xDF, 0xFB, 0xA3, 0x04, 0x23, 0x97, 0x10, 0x72, 0x80, 0x3A, 0x91, 0x6D, 0xD0},
    {0xC3, 0xC4, 0x31, 0x46, 0x62, 0x4C, 0x83, 0x7C, 0x18, 0x8F, 0x20, 0x14, 0x3E, 0x9B, 0xE6, 0x4E, 0xEE, 0x5E, 0xA4, 0xFB, 0x73, 0x7D, 0x00, 0xB3, 0x55, 0xBA, 0xBB, 0x18, 0x6D, 0xA7, 0x62, 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x91, 0x9A, 0xB8, 0x49, 0xFE, 0x6F, 0xED, 0x67, 0xFF, 0xB0, 0x3E, 0x14},
    {0x82, 0xAC, 0xA5, 0x14, 0x3E, 0xEC, 0xF7, 0x34, 0xAA, 0x65, 0x06, 0xC7, 0x6E, 0xBD, 0x87, 0xB3, 0x47, 0xA2, 0x9C, 0x63, 0xA6, 0x78, 0xCD, 0x83, 0x2C, 0x6A, 0xE2, 0xD1, 0xC3, 0xFE, 0x8B, 0x0C},
};

EccPoint g_public[10] = {
    {{0x77, 0xA0, 0x2A, 0x3A, 0xB2, 0x28, 0xE1, 0x64, 0x63, 0x32, 0x28, 0x04, 0x86, 0xD7, 0x5D, 0x85, 0xA5, 0x7C, 0x51, 0x84, 0xC4, 0xB9, 0xEE, 0x79, 0xD9, 0xC4, 0x61, 0x47, 0x1A, 0xC1, 0x51, 0x48},
        {0x20, 0xE3, 0xC8, 0xE2, 0xE0, 0x15, 0x57, 0x58, 0xB9, 0x17, 0x9C, 0x0B, 0x62, 0xEC, 0xC4, 0x08, 0xC6, 0xB9, 0x73, 0xB7, 0xB7, 0xAD, 0x35, 0x40, 0x94, 0xD1, 0x1D, 0x0D, 0x9F, 0xD9, 0x5B, 0x2A}},
    {{0x51, 0x02, 0x22, 0xC8, 0xB7, 0xB0, 0xA5, 0x2B, 0xEC, 0xBD, 0x4F, 0x8A, 0xF3, 0x14, 0x4E, 0x08, 0xFC, 0x67, 0xA0, 0x60, 0x54, 0x1E, 0xA7, 0x6D, 0xBC, 0xF6, 0x14, 0xF1, 0xA6, 0x36, 0x86, 0x4F},
        {0xA2, 0xA6, 0xAF, 0xFA, 0x05, 0xF0, 0xA9, 0xF3, 0x4F, 0x5F, 0x63, 0x09, 0x2B, 0x1A, 0x28, 0x43, 0x5D, 0x68, 0xA0, 0xA3, 0xE0, 0xED, 0x24, 0x11, 0xAD, 0x27, 0xA8, 0xAD, 0x5D, 0xB2, 0xCC, 0x75}},
    {{0x4A, 0xA9, 0xB3, 0x30, 0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0x75, 0xB4, 0x21, 0xC6, 0xC1, 0x0E, 0xF2, 0xD3}},
    {{0x3E, 0xCA, 0x68, 0x47, 0xE7, 0xF0, 0x76, 0x76, 0x93, 0xC2, 0x0B, 0x70, 0xFC, 0x80, 0xFD, 0x9B, 0x72, 0x59, 0xCB, 0x09, 0x97, 0xDF, 0x9E, 0xEC, 0x7E, 0x6C, 0x7E, 0xFB, 0x7C, 0x85, 0x98, 0x39},
        {0xF7, 0x81, 0xB7, 0xC2, 0xAB, 0x97, 0xA3, 0x0A, 0xFB, 0x29, 0x73, 0x8A, 0xB0, 0xB6, 0x97, 0xB1, 0x43, 0xB7, 0x55, 0x07, 0x44, 0xDF, 0xAC, 0x16, 0xA6, 0xAC, 0xF7, 0xDF, 0x63, 0xA3, 0x5B, 0xCE}},
    {{0xE4, 0x22, 0x59, 0xA4, 0x72, 0x38, 0xB2, 0xEA, 0xED, 0xF0, 0x3B, 0xE8, 0x09, 0xB2, 0xFC, 0x6F, 0xE2, 0x7B, 0x11, 0xE5, 0x9E, 0xE0, 0x58, 0xBB, 0xB0, 0xF1, 0x3D, 0xD6, 0x8B, 0xC8, 0x07, 0xE6},
        {0x5B, 0xE9, 0xE9, 0xD0, 0xF2, 0xEC, 0x11, 0x03, 0xA1, 0x3D, 0x7B, 0x01, 0x68, 0x03, 0x4D, 0x86, 0x73, 0xB2, 0x52, 0x2A, 0x19, 0x85, 0x05, 0xC5, 0x2C, 0x39, 0xCB, 0xA8, 0x86, 0x3E, 0xCD, 0xC2}},
    {{0xAC, 0x36, 0xBD, 0x99, 0xEE, 0x40, 0x55, 0x1D, 0x79, 0xB6, 0xCC, 0x9A, 0x54, 0x4D, 0x1D, 0xEB, 0x7D, 0x81, 0x41, 0xC7, 0x03, 0xA4, 0x98, 0x0F, 0x1E, 0x2F, 0xB6, 0x11, 0x18, 0x34, 0xAE, 0xF1},
        {0x5B, 0x66, 0xAB, 0x22, 0xBF, 0x16, 0x78, 0x61, 0x04, 0x6F, 0xE7, 0xBD, 0x09, 0x88, 0x27, 0xA0, 0x9E, 0xCC, 0xB5, 0x85, 0xCB, 0xF0, 0xF8, 0x5C, 0x19, 0x97, 0x40, 0xD6, 0x36, 0x0C, 0x65, 0xFE}},
    {{0xBE, 0x2B, 0x78, 0x7F, 0xEC, 0x88, 0x2C, 0x39, 0xF2, 0x2D, 0xD7, 0x06, 0xB7, 0x60, 0xA9, 0x4B, 0xBA, 0x67, 0x1B, 0x67, 0xBD, 0xAE, 0x87, 0xCA, 0xD7, 0xA1, 0xC0, 0xCD, 0xDA, 0x6B, 0xF2, 0x1D},
        {0x8B, 0x42, 0x93, 0x8D, 0xD5, 0xC1, 0xD1, 0x15, 0x1C, 0x1B, 0x81, 0x08, 0x87, 0x61, 0xA7, 0x84, 0x86, 0xD2, 0x64, 0xDA, 0x70, 0xAC, 0x91, 0x8E, 0xDB, 0x5F, 0x41, 0x7F, 0xC6, 0x19, 0xFB, 0x1E}},
    {{0x3A, 0xB3, 0x71, 0x79, 0x1E, 0xF0, 0xBD, 0x4D, 0x50, 0xDE, 0xB8, 0xED, 0xB5, 0x7D, 0xFF, 0xFF, 0xF2, 0x60, 0x79, 0x50, 0x7B, 0xEB, 0x75, 0xDC, 0x0E, 0x6A, 0x48, 0x8C, 0xBE, 0x97, 0x49, 0x39},
        {0xBF, 0x16, 0xDC, 0x0D, 0xFB, 0x11, 0x2D, 0xC4, 0x66, 0x60, 0xBA, 0x68, 0xC3, 0xF9, 0x5F, 0xD2, 0x68, 0x05, 0xAC, 0xCF, 0x96, 0xA8, 0x09, 0x04, 0x27, 0x49, 0x64, 0x5A, 0x8C, 0x4E, 0xA3, 0xC0}},
};

EccPoint g_dsa_public[10] = {
    {{0xEA, 0x73, 0xD8, 0x18, 0x76, 0x8F, 0xAE, 0x39, 0x14, 0xDF, 0x9D, 0x0D, 0x18, 0x6E, 0xF9, 0xFD, 0xE2, 0x8D, 0x8C, 0xD1, 0x79, 0xBB, 0x35, 0x81, 0x88, 0x68, 0x56, 0x15, 0xAF, 0x0D, 0x1E, 0x89},
        {0xB7, 0x39, 0x7D, 0x77, 0xD4, 0x0A, 0xA9, 0x98, 0x61, 0x6E, 0x21, 0x7F, 0xE6, 0x34, 0x0F, 0x3E, 0xFB, 0x42, 0x2D, 0xF7, 0x56, 0x8A, 0xEE, 0x1D, 0x74, 0x31, 0x67, 0x10, 0x5E, 0x1C, 0x61, 0x9B}},
    {{0x0F, 0xBC, 0xA2, 0x75, 0x27, 0x58, 0x88, 0x98, 0x5E, 0xB0, 0xB9, 0x3E, 0xDB, 0xBD, 0x6C, 0xFC, 0x4E, 0xBB, 0x2B, 0xAB, 0xEF, 0xB0, 0xF5, 0x1E, 0xE3, 0xFE, 0x52, 0xE3, 0x4A, 0x3A, 0x10, 0x31},
        {0x11, 0x25, 0xE0, 0xE9, 0x71, 0x3F, 0x93, 0xC6, 0x70, 0xB7, 0x1C, 0xF9, 0x41, 0x22, 0xB3, 0x0B, 0xA6, 0x10, 0x36, 0x8A, 0xFC, 0xCC, 0x81, 0x51, 0x28, 0xB5, 0xF2, 0x7B, 0x28, 0xE3, 0x5E, 0xC6}},
    {{0x96, 0xDA, 0x8F, 0x8E, 0x61, 0x0B, 0x94, 0xD4, 0x8C, 0xB4, 0x0F, 0x73, 0x06, 0xD5, 0x14, 0x84, 0xD4, 0xE5, 0xFD, 0xC0, 0xC2, 0x8D, 0x28, 0x76, 0x98, 0xFD, 0x6C, 0x7E, 0x02, 0x52, 0x11, 0x74},
        {0x5B, 0x05, 0xB8, 0xEA, 0x36, 0x0A, 0xA3, 0xB8, 0xFF, 0xB0, 0xA2, 0x96, 0x6A, 0x52, 0x53, 0x96, 0x0D, 0x81, 0xAC, 0x51, 0x20, 0x5E, 0x5D, 0xA1, 0x6E, 0x2D, 0xF6, 0x04, 0xEF, 0x4A, 0x96, 0xD0}},
    {{0xF7, 0x84, 0x55, 0xAD, 0x60, 0x84, 0x16, 0xE5, 0xC5, 0x97, 0xCB, 0x18, 0xE9, 0x31, 0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 0x28, 0xD1, 0xCE, 0x57, 0x11, 0xFD, 0x98, 0xBD, 0x6A, 0x2B, 0x98, 0x07, 0x8F, 0x59, 0xC5, 0x53, 0xFA, 0x70, 0x94, 0x84, 0xE3, 0x15, 0xAD, 0x5E, 0x97, 0xB2, 0xF4, 0xD7, 0x3B, 0x82, 0x18},
        {0x84, 0xA2, 0xF0, 0x4E, 0x92, 0xE6, 0xBF, 0xCE, 0x84, 0xE7, 0xAA, 0xF3, 0xA6, 0xE1, 0x44, 0xDE, 0x6B, 0x4C, 0x9C, 0x9D, 0x15, 0x4D, 0x5B, 0x98, 0xE9, 0x32, 0x98, 0xEF, 0xF5, 0x58, 0xB1, 0xC9}},
    {{0xBE, 0xF7, 0x13, 0xA5, 0x56, 0x59, 0x8B, 0x22, 0xA1, 0xA7, 0xB8, 0x17, 0xFA, 0x79, 0xD6, 0x4B, 0xA2, 0x39, 0x00, 0x72, 0xB0, 0xF1, 0xCC, 0xB8, 0x0C, 0xC9, 0xF6, 0xC3, 0x42, 0xE4, 0xFC, 0x59},
        {0x24, 0xC0, 0xC1, 0x82, 0x8B, 0x41, 0xE7, 0x8F, 0x09, 0xB5, 0x2A, 0x26, 0x8C, 0x9F, 0xCD, 0xDC, 0x33, 0x84, 0xF5, 0x0F, 0xC9, 0x90, 0x0A, 0x57, 0x49, 0xA9, 0x74, 0x7F, 0x63, 0x8D, 0x4A, 0xB1}},
    {{0xD9, 0x58, 0x8B, 0x85, 0x73, 0x0E, 0x05, 0x9A, 0xA4, 0x1C, 0xC8, 0x10, 0x00, 0x5E, 0x73, 0x6D, 0xCD, 0xEB, 0x39, 0xD1, 0xA8, 0xA8, 0x64, 0x08, 0x2F, 0xFD, 0x5D, 0x48, 0x83, 0x58, 0x6D, 0xE2},
        {0x36, 0x07, 0x45, 0x52, 0x93, 0xEE, 0x5D, 0x22, 0x25, 0xB2, 0x50, 0x46, 0x03, 0xD1, 0xDA, 0x5B, 0xAF, 0x25, 0x01, 0x2E, 0xAF, 0x9B, 0xE9, 0x38, 0x8A, 0x4A, 0x56, 0x71, 0x76, 0xF0, 0x50, 0x2B}},
    {{0x67, 0xC1, 0x6E, 0x08, 0xFA, 0xA4, 0xA6, 0x59, 0xC8, 0x41, 0x98, 0xB8, 0xFF, 0xD1, 0x55, 0x01, 0xB3, 0x16, 0x9C, 0xC9, 0xC4, 0xD0, 0x40, 0xB5, 0xBA, 0x67, 0x86, 0x5E, 0xE0, 0x8B, 0xA3, 0xF2},
        {0xF9, 0x84, 0xDB, 0xC2, 0x10, 0x1B, 0x90, 0xC3, 0x24, 0xCD, 0x4C, 0x38, 0x3A, 0x7D, 0x56, 0x4F, 0x15, 0x21, 0xEB, 0x05, 0x6E, 0x3E, 0x54, 0x81, 0x2F, 0x7C, 0x32, 0x27, 0x64, 0xF0, 0xA9, 0x2A}}
};

uint8_t g_dsa_hash[10][NUM_ECC_DIGITS] = {
    {0x95, 0x8E, 0x72, 0xE6, 0x3C, 0x1B, 0x65, 0xD3, 0x25, 0xAC, 0xF7, 0xF6, 0x50, 0xAF, 0xBA, 0x75, 0x32, 0x5E, 0x22, 0x47, 0x58, 0xB0, 0x7C, 0x10, 0x66, 0xBB, 0xC1, 0x5A, 0xC5, 0x46, 0x89, 0xED},
    {0x61, 0x76, 0x0D, 0xC9, 0xB3, 0x6D, 0xF9, 0x26, 0x4B, 0x90, 0x46, 0xDD, 0x54, 0x4D, 0x03, 0x9D, 0x40, 0x7A, 0x83, 0x17, 0xB1, 0x3E, 0xC0, 0x8C, 0xC7, 0xB5, 0x7A, 0xA7, 0xF7, 0xF3, 0x98, 0x7D},
    {0x66, 0x58, 0x5F, 0x04, 0x18, 0x9E, 0x88, 0x4B, 0x60, 0x3A, 0x3F, 0x5C, 0x46, 0x7A, 0x1B, 0xE5, 0x0A, 0x11, 0x11, 0x82, 0xD3, 0x91, 0xA3, 0xB0, 0x69, 0xDD, 0x93, 0xF0, 0xAB, 0xAB, 0x89, 0x8B},
    {0xFB, 0xF5, 0x4C, 0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0xDC, 0x9B, 0x16, 0x71, 0x89, 0x8F, 0x46, 0x25, 0xA0},
    {0xD7, 0x40, 0x50, 0xC2, 0x26, 0x5D, 0xA0, 0xEF, 0x64, 0x41, 0xFD, 0x06, 0x17, 0x54, 0x68, 0x01, 0x18, 0x6C, 0xB2, 0x65, 0x3C, 0xC6, 0x07, 0xE5, 0x35, 0x18, 0x15, 0x78, 0x81, 0x1C, 0x1A, 0xF2}
};

uint8_t g_dsa_r[10][NUM_ECC_DIGITS] = {
    {0xD6, 0xED, 0x2C, 0x75, 0xF5, 0x03, 0xCF, 0x3A, 0xDC, 0xC8, 0x47, 0x70, 0xF6, 0xB1, 0x6B, 0x66, 0xA3, 0x04, 0xF0, 0x5E, 0x63, 0x30, 0x56, 0x43, 0x7F, 0x47, 0xEC, 0xB0, 0xFF, 0xDC, 0xD6, 0x10},
    {0x47, 0x02, 0xE0, 0xB4, 0xD7, 0xFB, 0x76, 0xDA, 0xE6, 0x6F, 0xBE, 0x0B, 0x5C, 0x33, 0xAD, 0xA8, 0x30, 0x02, 0x31, 0x3F, 0xED, 0x35, 0x34, 0xE3, 0x8B, 0x98, 0x63, 0x6E, 0x37, 0xC2, 0x21, 0xAB},
    {0xB0, 0x47, 0x5D, 0x9D, 0x50, 0x87, 0x8F, 0xF8, 0xFB, 0x81, 0x7F, 0x77, 0x7E, 0xCF, 0x43, 0xDA, 0x7D, 0x74, 0xC7, 0x03, 0xAE, 0x4E, 0x1F, 0xD7, 0x0F, 0xDF, 0x29, 0xEB, 0x84, 0x3A, 0x46, 0xA0},
    {0xB8, 0xCA, 0xB2, 0x47, 0x5E, 0xB6, 0x63, 0x1A, 0x8E, 0xC2, 0x51, 0x9E, 0x62, 0x8C, 0x49, 0x2B, 0x5B, 0xF3, 0x93, 0x63, 0x6A, 0x0E, 0x8C, 0x7F, 0x42, 0x3E, 0xEF, 0x54, 0xCE, 0x5C, 0x28, 0x00},
    {0x6A, 0x0F, 0xB0, 0x68, 0x50, 0x71, 0x42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0E, 0x60, 0x88, 0x04, 0xB6, 0xC9, 0x03, 0x7F, 0x4A, 0x33, 0xE5, 0x9A, 0x7F, 0x35, 0x33, 0xB8, 0x6B, 0xD5, 0x95, 0x9A, 0x22, 0x97},
    {0xE2, 0x89, 0x62, 0xC0, 0x74, 0xDC, 0xE5, 0xD2, 0xD6, 0x0A, 0x51, 0x22, 0x7A, 0x2F, 0x8B, 0x8C, 0x5D, 0x2D, 0x04, 0x22, 0x73, 0x0F, 0x38, 0x22, 0xE7, 0x06, 0xF9, 0x89, 0xF4, 0xF5, 0xBA, 0x81},
    {0x06, 0x82, 0xB2, 0x3C, 0x9F, 0x9C, 0x5D, 0x6D, 0xFC, 0x19, 0xDE, 0x1C, 0x50, 0x74, 0x12, 0x19, 0x0C, 0x1B, 0x5A, 0x49, 0xE1, 0x7A, 0x47, 0xFB, 0x69, 0x21, 0x6B, 0xA0, 0x4D, 0x18, 0xCB, 0x1C},
    {0xC4, 0x1E, 0x5A, 0xCA, 0xCD, 0x6C, 0xBF, 0x4F, 0x61, 0xAE, 0xCC, 0x24, 0x41, 0x9C, 0xC4, 0x75, 0xB5, 0x8F, 0xA2, 0xCF, 0xBB, 0x70, 0x5D, 0xBA, 0xD5, 0x0A, 0xD8, 0xB0, 0x28, 0x7A, 0x8E, 0x2A},
    {0x0C, 0x8C, 0xC0, 0xAF, 0x19, 0xF8, 0x9E, 0x94, 0xE5, 0x51, 0x07, 0xB8, 0x6C, 0xD3, 0x77, 0x9E, 0xBF, 0xAD, 0x38, 0x23, 0x20, 0x4E, 0xF8, 0xD3, 0x97, 0x0B, 0xE3, 0x10, 0xF3, 0x0E, 0x7F, 0x61}
};

#elif (ECC_CURVE == secp384r1)

uint8_t g_private[10][NUM_ECC_DIGITS] = {
    {0xC6, 0xEF, 0xD5, 0x32, 0xF1, 0x70, 0x6E, 0x0A, 0x25, 0x91, 0xAE, 0x6C, 0xCF, 0x4E, 0xD7, 0x78, 0xFB, 0x23, 0xE4, 0x33, 0x91, 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, 0x7E, 0x97, 0x6F, 0xD2, 0x5C, 0x07, 0x10, 0xE5, 0x8C, 0x16, 0x58, 0xFC, 0xFB, 0x75, 0x3D},
        {0x82, 0x67, 0x5C, 0x90, 0x73, 0xC1, 0xE0, 0x22, 0xCC, 0x73, 0x73, 0xD1, 0xF7, 0xFD, 0x33, 0x45, 0x90, 0x93, 0xC6, 0x6C, 0x16, 0xEC, 0x5D, 0xE4, 0x6E, 0x21, 0x54, 0xC7, 0xEA, 0xE1, 0x53, 0x55, 0x24, 0x8B, 0x73, 0x4B, 0xE0, 0x13, 0xD4, 0xF1, 0x13, 0x18, 0xA5, 0xC3, 0xD6, 0x01, 0x2E, 0xCD}},
    {{0xC6, 0x2E, 0xC4, 0xE3, 0xAA, 0xFD, 0x38, 0x78, 0x8D, 0xAE, 0x03, 0x26, 0x5B, 0x0E, 0x4E, 0x76, 0xF9, 0xBB, 0xFC, 0x98, 0xB8, 0x0E, 0x2B, 0xC3, 0xAD, 0xCF, 0xA3, 0x1B, 0xC2, 0xA4, 0x92, 0x5C, 0x51, 0x2A, 0x8B, 0x86, 0x24, 0x34, 0xB5, 0x9B, 0x14, 0xA0, 0x1E, 0x0F, 0xF7, 0xDA, 0x2A, 0x53},
        {0x6E, 0x10, 0x7A, 0x57, 0xCD, 0x93, 0xAB, 0xC7, 0x8A, 0x17, 0x7A, 0x0E, 0x42, 0x22, 0x0A, 0x4B, 0x3D, 0xF8, 0xBA, 0xE3, 0xE5, 0x07, 0x40, 0xEF, 0xAF, 0x7A, 0xEF, 0x24, 0x61, 0x00, 0xB6, 0x28, 0xAA, 0x1B, 0x65, 0xB7, 0x76, 0x80, 0x82, 0xA8, 0x6E, 0x40, 0xA7, 0x19, 0xA1, 0xA8, 0x38, 0xAF}},
};

EccPoint g_dsa_public[10] = {
    {{0xD6, 0x32, 0xE3, 0xD3, 0x77, 0xC0, 0x9B, 0x24, 0xC3, 0x55, 0xC7, 0x5C, 0xF4, 0xB8, 0x14, 0x57, 0x53, 0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
    {0x39, 0x7D, 0x97, 0x01, 0x83, 0x56, 0x1F, 0x69, 0xCC, 0x32, 0x0B, 0xCB, 0xEB, 0x9D, 0x19, 0x1A, 0x9F, 0x04, 0x9A, 0x92, 0x7E, 0x29, 0xDB, 0xAD, 0x59, 0x4E, 0xF3, 0xC3, 0x0D, 0x6C, 0x27, 0xA7, 0xEB, 0x86, 0xEA, 0x18, 0x5A, 0x65, 0xCB, 0x2B, 0x3A, 0x96, 0x4B, 0x10, 0xA0, 0xD5, 0x50, 0xE6}
};

#endif

int main()
{
    uint8_t l_shared[NUM_ECC_DIGITS];
    uint64_t l_total = 0;
    
    unsigned i;
    for(i=0; i<10; ++i)
    {
        uint64_t l_start = getTimeMs();
        ecdh_shared_secret(l_shared, &g_public[i], g_private[i], NULL);
        uint64_t l_diff = getTimeMs() - l_start;
        vli_print(l_shared);
        printf("\n");
        printf("Time = %lu\n", l_diff);
        l_total += l_diff;
    }
    
    printf("Total ECDH time: %lu\n", l_total);
    
    l_total = 0;
    for(i=0; i<10; ++i)
    {
        uint64_t l_start = getTimeMs();
        if(!ecdsa_verify(&g_dsa_public[i], g_dsa_hash[i], g_dsa_r[i], g_dsa_s[i]))
        {
            printf("ecdsa_verify() failed\n");
        }
        uint64_t l_diff = getTimeMs() - l_start;
        printf("Time = %lu\n", l_diff);
        l_total += l_diff;
    }
    
    printf("Total ECDSA time: %lu\n", l_total);
    
    return 0;
}
